//
//  MenuViewController.h
//  Menu
//
//  Created by ZHY on 2017/7/26.
//  Copyright © 2017年 ZHY. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol   MenuViewControllerDelegate<NSObject>

@optional
/**
 *  选择了菜单条目
 *
 *  @param index 菜单的下标
 */
-(void)selectMenuWithIndex:(NSInteger)index title:(NSString *)title;

@end

@interface MenuViewController : UIViewController

@property (nonatomic,strong) NSArray<NSString *> *titles;
@property (nonatomic,weak) id<MenuViewControllerDelegate>delegate;


/**
 *  显示菜单栏
 *
 *  @param frame 在baseVc的范围
 *  @param titles 需要显示的标题上
 *  @param baseVc 菜单栏显示在某个控制器上
 */
-(void)showMenuWithFrame:(CGRect)frame titles:(NSArray<NSString *>*)titles inBaseVc:(UIViewController *)baseVc;


/**
 *  隐藏菜单栏
 */
-(void)hideMenu;

@end
